//这里封装着大量的接口
//引入http方法
import
http
from "./index.js"

//导出接口
//轮播图接口
export const getBanner = () => http({
	url: "/getbanner"
})
//首页分类导航接口
export const cateList = () => http({
	url: "/getcate"
})
//首页商品列表接口
export const shopList = () => http({
	url: "/gethortgoods"
})
//获取限时秒杀信息
export const getSeckill = () => http({
	url: "/getseckill"
})
//获取一级分类列表接口
export const getCates = () => http({
	url: "/getcates"
})
//获取二级分类接口
export const getGoodlist = (data) => http({
	url: "/getgoodlist",
	data
})
//获取商品详情接口
export const getGoodsInfo = (data) => http({
	url: "/getgoodsinfo",
	data
})
//搜索商品接口
export const getSearch = (data) => http({
	url: "/search",
	data
})
//获取验证码接口
export const getSms = (data) => http({
	url: "/sms",
	data
})
//H5登录接口
export const smsLogin = (data) => http({
	url: "/smslogin",
	method: "POST",
	data
})
//微信一键登录接口
export const wxLogin = (data) => http({
	url: "/wxlogin",
	method: "POST",
	data
})
//购物车列表接口
export const cartList = (data) => http({
	url: "/cartlist",
	data
})
//购物车添加接口
export const cartAdd = (data) => http({
	url: "/cartadd",
	method: "POST",
	data
})
//购物车删除接口
export const cartDelete = (data) => http({
	url: "/cartdelete",
	method: "POST",
	data
})
//购物车修改接口
export const cartEdit = (data) => http({
	url: "/cartedit",
	method: "POST",
	data
})
// 查找地址请求
export const addresslist = (data) => http({
	url: '/addresslist',
	data,
})
// 地址编辑
export const addressedit = (data) => http({
	url: "/addressedit",
	data,
	method: "POST"
})
// 地址删除
export const addressremove = (data) => http({
	url: "/addressremove",
	data,
	method: "POST"
})
// 地址添加
export const addressadd = (data) => http({
	url: '/addressadd',
	data,
	method: "POST"
})
//订单生成接口
export const orderAdd = (data) => http({
	url: "/orderadd",
	data,
	method: "POST"
})


//支付宝支付接口
export const aliPay = (data) => http({
	url: '/alipay',
	method: 'post',
	data
})

//获取会员信息接口
export const getUserinfo = (data)=>http({
	url: '/getuserinfo',
	data
})

//修改会员信息接口
export const infoedit = (data)=>http({
	url:"/infoedit",
	method:"POST",
	data
})